<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>长度单位</title>
  <style type="text/css">
    .box{
      width: 200px;
      height: 300px;
      background-color: #1b6f9b;
    }

    .box1{
      font-size: 20px;
      width: 1em;
      height: 40%;
      background-color: blueviolet;
    }
  </style>
</head>
<body>
  <div class="box">
    <div class="box1"></div>
  </div>
</body>
</html>